home *** CD-ROM | disk | FTP | other *** search
- Path: news.clark.net!not-for-mail
- From: gusty@clark.net (Harlan Messinger)
- Newsgroups: comp.lang.c++
- Subject: Re: READ THIS!!!!!!!!!!!
- Date: 31 Jan 1996 20:18:41 GMT
- Organization: Clark Internet Services, Inc., Ellicott City, MD USA
- Message-ID: <4eoir1$726@clarknet.clark.net>
- References: <4em5fs$a86@ixnews4.ix.netcom.com>
- NNTP-Posting-Host: explorer.clark.net
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=ISO-8859-1
- Content-Transfer-Encoding: 8bit
- X-Newsreader: TIN [UNIX 1.3 950726BETA PL0]
-
- Jeremy Johnston (jeremyx@ix.netcom.com) wrote:
- :
- : ok....now that I have your attention i need some help.
- : I can't get the following command to work & the compiler says that the
- : constant has too many characters.
- :
- : char dos;
- : if(dos=='dir')
- : goto b;
- :
-
- Either you haven't learned how strings work in C/C++ or you badly need a
- refresher.
-
- Single quotes delimit characters; double quotes delimit strings. 'dir' is
- invalid. "dir" is OK, but you won't get far comparing it to the variable
- dos because you'll be comparing the value of dos with the address of the
- constant string "dir".
-
- And heaven help you if your teacher/professor ever catches a goto in your
- C++ code.
-